#!/usr/bin/python
import re 

ga={'vbd_xvda_write': '14765.8662', 
    'memory_internal_free': '143340.0', 
    'vif_0_rx': '30.2263', 
    'memory_target': '536870912.0', 
    'cpu0': '0.002', 
    'cpu1': '0.0006', 
    'vif_0_tx': '0.0', 
    'vbd_xvda_read': '0.0', 
    'memory': '536870912.0'}

cpu_used=[]
global cpu_value
cpu_value=0
for i in ga:
    if re.search('cpu',i):
        cpu_used.append(ga[i])
for v in cpu_used:
        cpu_value+=float(v)
print cpu_value/(len(cpu_used))
